#ifndef StateWalk_h__
#define StateWalk_h__

#include "State.h"
#include "Logic/Vector2D.h"
#include "Scheduler/ITask.h"

class LivingEntity;

class MoveOneCellTask : public ITask {
public:
	static int count;     //because 
	virtual void Execute(int id, int time, void* pUser);
};

class StateWalk : public State
{
public:
	//constructor/functions
	StateWalk(LivingEntity* parent);
	void Update(float dt);
	void Enter();
	void Exit(){}
	void MoveOneCell();
	void SetDestCell(const Vector2Di& dest);
protected:
	void SetDirection(int dx, int dy);
protected:
	Vector2Di m_destCell;
	MoveOneCellTask m_moveTask;
};

#endif // StateWalk_h__